/* 右键菜单容器 */
.contextMenu {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  max-width: 250px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  animation: menuFadeIn 0.15s ease-out;
  backdrop-filter: blur(8px);
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 菜单头部 */
.menuHeader {
  padding: 12px 16px 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e0e0e0;
}

.roomInfo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.roomNumber {
  font-weight: bold;
  font-size: 14px;
}

.roomType {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.dateInfo {
  font-size: 11px;
  opacity: 0.9;
  font-weight: 500;
}

/* 菜单项容器 */
.menuItems {
  padding: 4px 0;
  max-height: 300px;
  overflow-y: auto;
}

/* 菜单项 */
.menuItem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: all 0.12s ease;
  position: relative;
}

.menuItem:hover {
  background: #f5f7fa;
  transform: translateX(2px);
}

.menuItem:active {
  background: #e3f2fd;
  transform: translateX(1px);
}

.menuItem.danger {
  color: #d32f2f;
}

.menuItem.danger:hover {
  background: #ffebee;
  color: #c62828;
}

.menuItem.disabled {
  color: #bbb;
  cursor: not-allowed;
  opacity: 0.5;
}

.menuItem.disabled:hover {
  background: none;
  transform: none;
}

/* 图标和标签 */
.icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.label {
  font-weight: 500;
  flex: 1;
}

/* 分割线 */
.divider {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 8px;
}

/* 菜单底部 */
.menuFooter {
  padding: 8px 16px 12px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: bold;
  color: #2e7d32;
  font-size: 12px;
}

.building {
  font-size: 11px;
  color: #666;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .contextMenu {
    min-width: 180px;
    max-width: 220px;
  }
  
  .menuItem {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .icon {
    font-size: 16px;
    width: 18px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .contextMenu {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .menuHeader {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  }
  
  .menuItem {
    color: #e2e8f0;
  }
  
  .menuItem:hover {
    background: #4a5568;
  }
  
  .menuItem:active {
    background: #2b6cb0;
  }
  
  .menuItem.danger {
    color: #fc8181;
  }
  
  .menuItem.danger:hover {
    background: #742a2a;
  }
  
  .divider {
    background: #4a5568;
  }
  
  .menuFooter {
    background: #1a202c;
    border-color: #4a5568;
  }
  
  .price {
    color: #68d391;
  }
  
  .building {
    color: #a0aec0;
  }
}

/* 滚动条美化 */
.menuItems::-webkit-scrollbar {
  width: 4px;
}

.menuItems::-webkit-scrollbar-track {
  background: transparent;
}

.menuItems::-webkit-scrollbar-thumb {
  background: #c1c9d2;
  border-radius: 2px;
}

.menuItems::-webkit-scrollbar-thumb:hover {
  background: #a0a8b1;
}
